<?php namespace App\Models;

use Illuminate\Database\Eloquent\Model;
/**
 * App\Models\WorksExportJob
 *
 * @package App\Models
 * @property int $id
 * @property integer $honor_id 荣誉id
 * @property integer $rate_id 评委id
 * @property integer $user_id 教师的user_id
 * @property string  $type 类别
 * @mixin \Eloquent
 */

class HonorRateTeacher extends Model
{
    protected $table = 'honor_rate_teacher';



    protected $rules = [
        'honor_id' => 'required'
    ];

    protected $validationMessages = [
        'honor_id.required' => '荣誉必选',
    ];

    public function rater(){
        return $this->belongsTo('\App\Models\Rater', 'rate_id');
    }

    public function teacher(){
        return $this->belongsTo('\App\Models\Teacher','user_id','user_id');
    }
}